//
//  OPHelperAccountCell.m
//  OnePiece
//
//  Created by lanou on 15/10/31.
//  Copyright © 2015年 wsy. All rights reserved.
//

#import "OPHelperAccountCell.h"

@implementation OPHelperAccountCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        _iconView = [[UIImageView alloc]initWithFrame:CGRectMake(10, 5, 40, 40)];
        _iconView.layer.cornerRadius = 20;
        _iconView.layer.masksToBounds = YES;
        [self.contentView addSubview:_iconView];
        
        _contentLabel = [[UILabel alloc]initWithFrame:CGRectMake(55, 10, 100, 30)];
        _contentLabel.font = [UIFont systemFontOfSize:15];
        [self.contentView addSubview:_contentLabel];
        
        _money = [[UILabel alloc]initWithFrame:CGRectMake(self.frame.size.width - 80, 10, 100, 30)];
        _money.textAlignment = NSTextAlignmentRight;
        [self.contentView addSubview:_money];
        
        
    }
    return self;
}


- (void)configuraDataWithModel:(OPHelperAccountModel *)m
{
    _iconView.image = [UIImage imageNamed:m.icon];
    _contentLabel.text = m.content;
    _money.text = [NSString stringWithFormat:@"%@元",m.money];
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
